env = Environment()
#env.Program(target = 'foo', source = 'foo.c')

SConscript('webserver/SConstruct')
SConscript('util/SConstruct')
SConscript('dhcpd/SConstruct')
SConscript('beacon/SConscript')


# Tell SCons to create our build files in the 'build' directory
VariantDir('build', 'src', duplicate=0)

# Set our source files
source_files = ['main.cpp', 'sshclient.cpp', 'beaconserver.cpp','opentftpd.cpp', 'opendhcpd.cpp']

# Set our required libraries
libraries = ['protobuf','boost_system','boost_filesystem', 'pthread','ssh2', 'util', 'webserver', 'microhttpd', 'crypto','dhcpd']
#lprotobuf -lboost_system -lpthread -lssh2 util/libutil.a webserver/libwebserver.a -lmicrohttpd -lcrypto
library_paths = ['util/', 'webserver/','dhcpd']

env = Environment()

env.Append( CPPFLAGS=['-std=c++11', '-pthread',  '-c'] )


#env.StaticLibrary('util', source_files)
# Tell SCons the program to build
env.Program('main', source_files, LIBS = libraries, LIBPATH = library_paths)


